﻿#region Imports
using System.Drawing;
#endregion


namespace RS.Controls.Timeline
{
    /// <summary>
    /// Every TimeSlice must implement this interface
    /// </summary>
    public interface ITimeSlice
    {
        /// <summary>
        /// Draws the specified g.
        /// </summary>
        /// <param name="g">The g.</param>
        void Draw(Graphics g);

        /// <summary>
        /// Determines whether the specified x is collision.
        /// </summary>
        /// <param name="x">The x.</param>
        /// <returns>
        /// 	<c>true</c> if the specified x is collision; otherwise, <c>false</c>.
        /// </returns>
        bool IsCollision(int x);

        /// <summary>
        /// Determines whether the specified x1 is collision.
        /// </summary>
        /// <param name="x1">The x1.</param>
        /// <param name="x2">The x2.</param>
        /// <returns>
        /// 	<c>true</c> if the specified x1 is collision; otherwise, <c>false</c>.
        /// </returns>
        bool IsCollision(int x1, int x2);

        /// <summary>
        /// This method is executed when the time slice is activated.
        /// </summary>
        void Action();

        /// <summary>
        /// Gets or sets the x.
        /// </summary>
        /// <value>The x.</value>
        int X { get; set; }
        int Y { get; set; }
        int H { get; set; }
        int W { get; set; }
        bool IsActive { get; set; }
        bool IsTicked { get; set; }
        Color Color { get; set; }
    }
}
